package com.ruoyi.monitorTools.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.common.annotation.DataSource;
import com.ruoyi.common.enums.DataSourceType;
import com.ruoyi.monitorTools.domain.AdsbDynamicInfo;
import com.ruoyi.monitorTools.domain.DynamicInfo;
import com.ruoyi.monitorTools.service.AdsbDynamicInfoService;
import com.ruoyi.monitorTools.mapper.AdsbDynamicInfoMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
* @author Administrator
* @description 针对表【adsb_dynamic_info】的数据库操作Service实现
* @createDate 2025-03-19 11:36:35
*/
@Service
@DataSource(value = DataSourceType.SLAVE)
public class AdsbDynamicInfoServiceImpl extends ServiceImpl<AdsbDynamicInfoMapper, DynamicInfo>
    implements AdsbDynamicInfoService{

    @Autowired
    private AdsbDynamicInfoMapper adsbDynamicInfoMapper;

    @Override
    public Long selectMaxCreatetime() {
        QueryWrapper<DynamicInfo> queryWrapper = new QueryWrapper<>();
        queryWrapper.select("MAX(create_time) as max_create_date");
        DynamicInfo dynamicInfo = adsbDynamicInfoMapper.selectOne(queryWrapper);
        return dynamicInfo.getCreateTime();
    }
}




